<!--
/**
* Author: gaohui
* Date: 2023-03-01 10:00
* Desc: BackHome 返回首页
*/
-->

<template>
  <el-button class="back-home-btn" type="warning" size="default" round @click.stop="handleBack"
    >返回首页 <el-icon class="el-icon--right"><HomeFilled /></el-icon
  ></el-button>
</template>

<script name="BackHome" lang="ts" setup>
import { useRouter } from "vue-router";
import { HomeFilled } from "@element-plus/icons-vue";

const router = useRouter();
const handleBack = () => {
  router.push({
    path: "/index",
  });
};
</script>
<style lang="scss" scoped>
.back-home-btn {
  position: fixed;
  z-index: 99;
  bottom: 20px;
  right: 20px;
}
</style>
